#include <linux/module.h>
#include <linux/kernel.h> 

 
 
extern int num;//导入int类型变量num
extern int addNumber(int a, int b);//导入函数add


static int __init helloworld_init(void)        
{
	static int sum;
	printk("num =%d",num);
    sum=addNumber(100,20);
	printk("sum =%d",sum);
	printk(KERN_EMERG "helloworld_init\r\n");
	return 0;
}
static void __exit helloworld_exit(void)    
{
	printk(KERN_EMERG "helloworld_exit\r\n");
}

module_init(helloworld_init);    
module_exit(helloworld_exit);   
MODULE_LICENSE("GPL v2");    
MODULE_AUTHOR("wang fang chen"); 
